<!--#include file="md5.asp" -->
<!--#include file="Function.asp" -->
<!DOCTYPE html>
<!--[if lt IE 7]><html lang="zh-CN" class="ie6 ielt8"><![endif]--> 
<!--[if IE 7]><html lang="zh-CN" class="ie7 ielt8"><![endif]--> 
<!--[if IE 8]><html lang="zh-CN" class="ie8"><![endif]--> 
<!--[if (gte IE 9)|!(IE)]><!--><html lang="zh-CN"><!--<![endif]--> 
<head>
<meta charset="utf-8">
<title>taoke</title>

</head>
<%'Edit By [url]www.yeyoubao.com[/url]
fields = "click_url,shop_click_url,seller_credit_score,iid,detail_url,title,nick,type,cid,seller_cids,props,input_pids,input_str,desc,pic_url,num,valid_thru,list_time,delist_time,stuff_status,location,price,post_fee,express_fee,ems_fee,has_discount,freight_payer,has_invoice,has_warranty,has_showcase,modified,increment,auto_repost,approve_status,postage_id,product_id,auction_point,property_alias,item_imgs,prop_imgs,skus,outer_id,is_virtual,is_taobao,is_ex,videos,is_3D,score,volume,one_station,postage_id"
v = "2.0"
appkey = "21030373"
appsecret = "9dfc44ff9d6aee29ce90c247b3e7afa0"
usernick = "湖南电子商务"
topurl = "http://gw.api.tbsandbox.com/router/rest"
timestamp = getDate(date,"yyyy-mm-dd")&" "&getTime(time,"hh:mm:ss")
timestamp2 = server.URLEncode(timestamp)
method = "taobao.taobaoke.items.detail.get"
iid = Request.QueryString("iid")
format = "xml"
sign = appsecret&"app_key"&appkey&"fields"&fields&"format"&format&"method"&method&"nick"&usernick&"num_iids"&iid&"timestamp"&timestamp&"v"&v
top_sign = md5(sign)
postdatastr = "app_key="&appkey&"&fields="&fields&"&format="&format&"&method="&method&"&nick="&usernick&"&num_iids="&iid&"&sign="&top_sign&"&timestamp="&timestamp2&"&v="&v
'response.write postdatastr
'response.end

REST_RESPONSE = PostHttpPage(topurl, postdatastr)
response.end
Set xml=Server.CreateObject("Microsoft.XMLDOM")
xml.Async=False
xml.ValidateOnParse=False
xml.LoadXml(REST_RESPONSE)
If xml.ReadyState>2 Then
set total_results= xml.documentElement.selectSingleNode("total_results")
if total_results is nothing then
total_results=0
response.end
else
total_results=xml.getElementsByTagName("total_results")(0).Text
end if
end if
Set item=xml.getElementsByTagName("taobaoke_items/taobaoke_item_detail/item_detail")
For res=0 To (item.Length-1)
Set title=item.Item(res).getElementsByTagName("title")'商品名称
Set picurl=item.Item(res).getElementsByTagName("pic_url")'商品图片 Set price=item.Item(res).getElementsByTagName("price")'商品价格
Set desc=item.Item(res).getElementsByTagName("desc")'商品详情 title=title.Item(0).Text
picurl=picurl.Item(0).Text
price=price.Item(0).Text
desc=desc.Item(0).Text
response.write "商品名称"&title&"<br />"
response.write "商品图片"&picurl&"<br />"
response.write "商品价格"&price&"<br />"
response.write "商品详情"&desc&"<br />"
next
%>
<body>

</body>
</html>
